//设置--配送区域
import React from "react";
import "./css/set-delivery-area.css";
import PageTitle from "../../component/set/PageTitle";
import IconFont from "../../component/logo";
import SetButton from "../../component/set/SetBtton";
import { Table } from "antd";

class SetDeliveryArea extends React.Component {
  constructor() {
    super();
    this.state = {
      pagination: false,
      data: [
        {
          key: 1,
          name: "深圳同城",
          value:
            "罗湖区，福田区，南山区，宝安区，龙岗区，盐田区，其他区，光明新区，坪山区，大鹏新区，龙华新区",
        },
      ],
      columns: [
        {
          title: "ID",
          dataIndex: "key",
          key: "key",
        },
        {
          title: "配送区域名称",
          dataIndex: "name",
          key: "name",
        },
        {
          title: "所辖区域",
          dataIndex: "value",
          key: "value",
        },
        {
          title: "操作",
          render: () => (
            <div>
              <SetButton txt="修改"></SetButton>
              <SetButton txt="删除"></SetButton>
            </div>
          ),
        },
      ],
      selectedRowKeys: [],
    };
  }
  render() {
    const { selectedRowKeys } = this.state;
    const rowSelection = {
      selectedRowKeys,
    };
    return (
      <div className="set_delivery_area">
        <PageTitle
          title="配送区域"
          icon={<IconFont type="icon-quyu1"></IconFont>}
          btn={<SetButton txt="添加"></SetButton>}
        ></PageTitle>
        <Table
          rowSelection={rowSelection}
          columns={this.state.columns}
          dataSource={this.state.data}
          pagination={this.state.pagination}
        ></Table>
      </div>
    );
  }
}

export default SetDeliveryArea;
